package demo.standard;

/**
 * 内部类式单例
 */
public class SingletonInnerClass {

    private SingletonInnerClass() {
    }

    public static SingletonInnerClass getInstance() {
        return InnerClass.instance;
    }

    private static class InnerClass {
        private static final SingletonInnerClass instance = new SingletonInnerClass();
    }
}
